<?php
$PaymentFinancialReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'PaymentFinancialReport');
$PaymentTypeFinancialReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'PaymentTypeFinancialReport');
$HistoryFinancialReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'HistoryFinancialReport');
?>
<h2>Relat&oacute;rio Financeiro do Cliente</h2>
<section id="FinancialReport">
    <table id="FinancialReport_ReportPagamento" class="Report">
        <thead>
            <tr>
                <th colspan="2">Relat&oacute;rio Financeiro</th>
            </tr>
            <tr class="header">
                <td width="50%">Quesito</td>
                <td width="50%">Valor</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>N&uacute;mero de Mensalidades</td>
                <td><?=$PaymentFinancialReport[0]['MounthlyPaymentsNumber']?></td>
            </tr>
            <tr>
                <td>Valor Total Recebido</td>
                <td><?=$PaymentFinancialReport[0]['ReceivedTotalValue']?></td>
            </tr>
            <tr>
                <td>Tempo de Casa</td>
                <td><?=$PaymentFinancialReport[0]['HomeTime']?> dias</td>
            </tr>
        </tbody>
    </table>
    <table id="FinancialReport_ReportTipoPagamento" class="Report hide">
        <thead>
            <tr>
                <th colspan="2">Relat&oacute;rio Financeiro</th>
            </tr>
            <tr class="header">
                <td width="50%">Quesito</td>
                <td width="50%">Valor</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Cart&atilde;o</td>
                <td><?=$PaymentTypeFinancialReport[0]['CreditCardPayment']?></td>
            </tr>
            <tr>
                <td>Boleto</td>
                <td><?=$PaymentTypeFinancialReport[0]['BillPayment']?></td>
            </tr>
        </tbody>
    </table>
    <table id="FinancialReport_ReportHistory" class="Report hide">
        <thead>
            <tr>
                <th colspan="2">Relat&oacute;rio Financeiro</th>
            </tr>
            <tr class="header">
                <td width="50%">Quesito</td>
                <td width="50%">Valor</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Congelado</td>
                <td><?=$HistoryFinancialReport[0]['Frozen']?></td>
            </tr>
            <tr>
                <td>Pré Congelado</td>
                <td><?=$HistoryFinancialReport[0]['PreFrozen']?></td>
            </tr>
            <tr>
                <td>Número de Atrasos</td>
                <td><?=$HistoryFinancialReport[0]['Delays']?></td>
            </tr>
            <tr>
                <td>Porcentagem das Mensalidades Atrasadas</td>
                <td><?=$HistoryFinancialReport[0]['DelaysPercentage']?>%</td>
            </tr>
        </tbody>
    </table>

    <div class="pagination">
        <a href="#" rel="ReportPagamento" class="selected borderRadios">Pagamento</a>
        <a href="#" rel="ReportTipoPagamento" class="nonselected borderRadios">Tipos de Pagamento</a>
        <a href="#" rel="ReportHistory" class="nonselected borderRadios">Hist&oacute;rico</a>
    </div>
</section>